<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <!-- Title and other stuffs -->
    <title>单条内容管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="">
    {include file="public/css" /}
    <style>
        tr img{ max-width: 100px; max-height: 100px;}
    </style>
</head>

<body>

{include file="public/top" /}

<!-- Main content starts -->

<div class="content">

    <!-- 左侧菜单 -->
    {include file="public/menu" /}
    <!-- 左侧菜单 ends -->

    <!-- Main bar -->
    <div class="mainbar">

        <!-- Page heading -->
        <div class="page-head">
            <h2 class="pull-left"><i class="icon-home"></i> 单条内容管理</h2>

            <!-- Breadcrumb -->
            <div class="bread-crumb pull-right">
                <a href="#" class="bread-current">系统管理</a>
            </div>

            <div class="clearfix"></div>

        </div>
        <!-- Page heading ends -->



        <!-- Matter -->

        <div class="matter">
            <div class="container">

                <div class="row">
                    <div class="col-lg-12">
                        <div class="ibox-content" style="line-height: 45px;">
                            <form class="form-inline" action="" method="get">

                                <div class="form-group">
                                    <label class="sr-only">课程名称</label>
                                    <input type="text" placeholder="课程名称" id="courses_title" name="courses_title" class="form-control" value="{$courses_title}">
                                </div>

                                <div class="form-group">
                                    <label class="sr-only">内容分类</label>
                                    <select class="form-control" name="classify">
                                        <option value="0">选择内容分类</option>
                                        {volist name="classifys" id="class"}
                                        <option value="{$class.id}" {if condition="$class['id'] eq $classify"}selected="selected"{/if}>{$class.classify_name}</option>
                                        {/volist}
                                    </select>
                                </div>

                                <div class="form-group">
                                    <label class="sr-only">是否有推文</label>
                                    <select class="form-control" name="has_generalize">
                                        <option value="0">是否有推文</option>
                                        <option value="1" {if condition="$has_generalize eq 1"}selected="selected"{/if}>是</option>
                                        <option value="2" {if condition="$has_generalize eq 2"}selected="selected"{/if}>否</option>
                                    </select>
                                </div>

                                <div class="form-group">
                                    <label class="sr-only">是否有收益</label>
                                    <select class="form-control" name="has_earning">
                                        <option value="0">是否有收益</option>
                                        <option value="1" {if condition="$has_earning eq 1"}selected="selected"{/if}>是</option>
                                        <option value="2" {if condition="$has_earning eq 2"}selected="selected"{/if}>否</option>
                                    </select>
                                </div>

                                <div class="form-group">
                                    <label class="sr-only">是否为默认banner素材</label>
                                    <select class="form-control" name="is_default_banner">
                                        <option value="0">是否为默认banner素材</option>
                                        <option value="1" {if condition="$is_default_banner eq 1"}selected="selected"{/if}>是</option>
                                        <option value="2" {if condition="$is_default_banner eq 2"}selected="selected"{/if}>否</option>
                                    </select>
                                </div>

                                <button class="btn btn-primary" type="submit">查询</button>
                            </form>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-12">

                        <div class="widget">
                            <div class="widget-head">
                                <div class="pull-left">Tables</div>
                                <div class="widget-icons pull-right">
                                    <a href="#" class="wminimize"><i class="icon-chevron-up"></i></a>
                                    <a href="#" class="wclose"><i class="icon-remove"></i></a>
                                </div>
                                <div class="clearfix"></div>
                            </div>

                            <div class="widget-content">

                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                    <tr>
                                        <th width="50">内容ID</th>
                                        <th width="160">内容名称</th>
                                        <th width="100">内容H5详情页链接</th>
                                        <th width="100">推广banner</th>
                                        <th width="200">内容分类</th>
                                        <th width="40">是否有推文</th>
                                        <th width="40">是否有收益</th>
                                        <th width="40">是否为默认bannel</th>
                                        <th width="60">内容售价</th>
                                        <th width="60">推广收益</th>
                                        <th width="70">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>

                                    {volist name="lists" id="li"}
                                    <tr>
                                        <td>{$li.id}</td>
                                        <td>{$li.title}</td>
                                        <td>
                                            <a href="" target="_blank"></a>
                                        </td>
                                        <td>
                                            <img src="{$li.banner}" />
                                        </td>
                                        <td>{$li.classify_name}</td>
                                        <td>{$li.has_generalize}</td>
                                        <td>{$li.has_earning}</td>
                                        <td>{$li.is_default_banner}</td>
                                        <td>{$li.price}</td>
                                        <td>{$li.generalize_earning}</td>
                                        <td>
                                            <a href="{:url('/admin/courses/coEdit',['id'=>$li.id])}" class="btn btn-xs btn-default" title="修改"><i class="icon-pencil"></i> </a>
                                            <button class="btn btn-xs btn-default" title="删除" ajax-id="data-delete" data-url="/admin/courses/coDelete" data-id="{$li.id}"><i class="icon-trash"></i> </button>
                                        </td>
                                    </tr>
                                    {/volist}

                                    </tbody>
                                </table>

                                <div class="pagination1">
                                    {$page}
                                </div>

                            </div>

                        </div>


                    </div>
                </div>
                <!-- Dashboard graph ends -->


            </div>
        </div>

        <!-- Matter ends -->

    </div>

    <!-- Mainbar ends -->
    <div class="clearfix"></div>

</div>
<!-- Content ends -->

<!-- Footer starts -->
{include file="public/foot" /}
<!-- Footer ends -->

<!-- Scroll to top -->
<span class="totop"><a href="#"><i class="icon-chevron-up"></i></a></span>

{include file="public/js" /}
<script src="/static/admin/js/system/form.js"></script>
</body>
</html>